Dear members,
I apologise in advance for the stupidity of my question but can't understnd where the problem lies. I have a dataset of meaurements of one parameter in subjects; eachs ubject undergoes measurements while supine with no device then measurements using one specific device (these are alternate: supine/one device, then supine/second device and so on). Only three devices. I created also a dummy variable "sup_preox" where value 1 is given to the supine sessions
In a reduced version ths lookslike this
id session device sup_preox EIT_POST
124 Baseline Supine Ambu Peep 1 43
124 At 3 min Ambu Peep 0 53
124 Baseline Supine 2 Face Mask 1 49
124 At 3 min sess 2 Face Mask 0 51
124 Baseline Supine sess 3 Ambu 1 53
124 At 3 min sess 3 Ambu 0 58
127 Baseline Supine Face Mask 1 27
127 At 3 min Face Mask 0 27
127 Baseline Supine 2 Ambu Peep 1 37
127 At 3 min sess 2 Ambu Peep 0 35
127 Baseline Supine sess 3 Ambu 1 31
127 At 3 min sess 3 Ambu 0 31
Now, I want to compare the EIT-POST value at supine with the one with each device but if I ask stata to describe the median value of the three supine sessions with the operator "|" I get a different asnwer than when asking STATA to give me this result with the dummy variable
Code:
1. sum EIT_POST if session==1|session==5|session==9, d
2. sum EIT_POST if sup_preox==1, d
In fact these commands should be describing the same data so I don't get why I get different results.
Thanks in advance for the help
Ana (Stata v. 18 BE)
I apologise in advance for the stupidity of my question but can't understnd where the problem lies. I have a dataset of meaurements of one parameter in subjects; eachs ubject undergoes measurements while supine with no device then measurements using one specific device (these are alternate: supine/one device, then supine/second device and so on). Only three devices. I created also a dummy variable "sup_preox" where value 1 is given to the supine sessions
In a reduced version ths lookslike this
id session device sup_preox EIT_POST
124 Baseline Supine Ambu Peep 1 43
124 At 3 min Ambu Peep 0 53
124 Baseline Supine 2 Face Mask 1 49
124 At 3 min sess 2 Face Mask 0 51
124 Baseline Supine sess 3 Ambu 1 53
124 At 3 min sess 3 Ambu 0 58
127 Baseline Supine Face Mask 1 27
127 At 3 min Face Mask 0 27
127 Baseline Supine 2 Ambu Peep 1 37
127 At 3 min sess 2 Ambu Peep 0 35
127 Baseline Supine sess 3 Ambu 1 31
127 At 3 min sess 3 Ambu 0 31
Now, I want to compare the EIT-POST value at supine with the one with each device but if I ask stata to describe the median value of the three supine sessions with the operator "|" I get a different asnwer than when asking STATA to give me this result with the dummy variable
Code:
1. sum EIT_POST if session==1|session==5|session==9, d
2. sum EIT_POST if sup_preox==1, d
In fact these commands should be describing the same data so I don't get why I get different results.
Thanks in advance for the help
Ana (Stata v. 18 BE)
Comment